<?php	$p=permissionController::singleton(); ?>

<div id="page">

<div id="content">


	<table>
			<th>Nome</th>
			<th>Numero anni attivi</th>
			<th>Stato</th>
			<th>Durata</th>
			<?php 
			$uri['controller']="CorsoStudio";
			$uri['method']="Upadate_openViewCorso";
			if($p->permission($uri)){ ?>
			<th>Modifica</th>
			<?php }?>
			<?php 
			$uri['controller']="CorsoStudio";
			$uri['method']="Delete_CorsoStudio";
			if($p->permission($uri)){ ?>
			<th>Cancella</th>
          <?php }?>

		<?php
		foreach ($vars as $result){
			echo "<tr>
					<td >"
						.$result[Nome]."
					</td>
					<td >"
						.$result['Numero anni attivi']."
					</td>
					<td >"
						.$result[Stato]."
					</td>
					<td >"
						.$result[Durata]."
					</td>";
				$uri['controller']="CorsoStudio";
			$uri['method']="Upadate_openViewCorso";
			if($p->permission($uri)){
					echo "<td>
						<a target='_blank' href='".BASE_PATH."CorsoStudio/Upadate_openViewCorso/?id=".$result[IdCorsoStudio]."'>
							<img src='".BASE_PATH."application/view/image/modifica.jpg' border='0'>
						</a>
					</td>";
			}
				$uri['controller']="CorsoStudio";
			$uri['method']="Delete_CorsoStudio";
			if($p->permission($uri)){
				echo "			
					<td>
						<a  href='".BASE_PATH."CorsoStudio/Delete_CorsoStudio/?id=".$result[IdCorsoStudio]."'>
							<img src='".BASE_PATH."application/view/image/esci.png' border='0'>
						</a>
				</tr>";
		}}

		?>

		
		
	</table>
	<br>
	
</div>
</div>

